package com.liaoct.lct.runnable;

import com.liaoct.lct.activity.BaseActivity;

public class DelayCloseGuideRunnable implements Runnable {

	private BaseActivity activity;
	
	private boolean flag = true;

	public DelayCloseGuideRunnable(BaseActivity activity) {
		this.activity = activity;
	}

	@Override
	public void run() {
		try {
			long startTime = System.currentTimeMillis();
			while (flag) {
				if(System.currentTimeMillis() - startTime > 900) {
					activity.nextActivity();
					break;
				}
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	public boolean isFlag() {
		return flag;
	}

	public void setFlag(boolean flag) {
		this.flag = flag;
	}

}
